package com.itheima_01;

import java.util.Comparator;
import java.util.TreeSet;

public class Test03 {
    public static void main(String[] args) {
        TreeSet<String> ts = new TreeSet<>(new Comparator<String>() {
            @Override
            public int compare(String o1, String o2) {
                return -o1.compareTo(o2);
            }
        });

        ts.add("曹操");
        ts.add("刘备");
        ts.add("孙坚");
        System.out.println(ts);

    }
}
